#define _CRT_SECURE_NO_WARNINGS 1
#include"LinkedList.h"
void SlistPrint(Node*phead)
{
	Node* cur = phead;
	assert(phead);
	while (cur->next)
	{
		printf("%d->", cur->data);
		cur = cur->next;
	}
}
void SListPushBack(Node** phead, DateType x)
{
		Node* newnode = (Node*)malloc(sizeof(Node));
		if (newnode == NULL)
		{
			perror("malloc");
			exit(-1);
		}
		else
		{
			newnode->data = x;
			newnode->next = NULL;
		}
		if (*phead == NULL)
		{
			*phead = newnode;
			return;
		}
		Node* tail = *phead;
		while (tail->next)
		{
			tail = tail->next;
		}
		tail->next = newnode;
}

